<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="include/base.jsp" %>

<!DOCTYPE HTML>
<html lang="zh-CN">
<head>
	<meta charset="UTF-8">
	<title>凯盛项目管理系统</title>
	<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" />
	<link href="select2/select2.css" rel="stylesheet"/>
</head>
<body class="body">
	
	<%@ include file="include/top.jsp" %>
	
	
	<div class="container">
	  <div class="row">
		<div class="span9">
		  <form action="newProject.jspx" method="post" class="form-horizontal">
	        <fieldset>
	          <legend>开始一个新项目</legend>
	          <div class="control-group">
	            <label class="control-label" for="input01">项目名称</label>
	            <div class="controls">
	              <input type="text" name="projectName" class="span5" id="input01" x-webkit-speech="undefined">
	            </div>
	          </div>
	          <div class="control-group">
	            <label class="control-label" for="input01">项目描述</label>
	            <div class="controls">
	              <textarea name="desc" class="span5" rows="4"></textarea>
	            </div>
	          </div>
	          <div class="control-group">
	            <label class="control-label" for="multiSelect">负责人</label>
	            <div class="controls">
	              <select name="principal" id="multiSelect"><!--负责人-->
	              	<option></option>
	              	<c:forEach items="${requestScope.emplist}" var="employee">
		                <option value="${employee.id}">${employee.username}</option>
	              	</c:forEach>
	              </select>
	            </div>
	          </div>
	         <div class="control-group">
	            <label class="control-label" for="input01">项目成员</label>            
	            <div class="controls">
	              <!-- <input type="text" name="members" class="span5" id="input01" x-webkit-speech="undefined"> -->
	              <!-- 使用Select2插件 -->
	              <select id="e2_2" name="members" multiple="multiple" style="width:400px">
				      <!-- <option value="AL">Alabama</option> -->
				    <c:forEach items="${requestScope.emplist}" var="employee">
		                <option value="${employee.id}">${employee.username}</option>
	              	</c:forEach>  
				  </select>
				  
	            </div>
	          </div>
	          
	          <div class="form-actions">
	            <button id="a" type="submit" class="btn btn-primary">保存</button>
	            <button class="btn" type="button" id="back">返回</button>
	          </div>
	        </fieldset>
          </form>          
          	
		</div>
		<div class="span3">
			
		</div>
	  </div>
	</div>
	
	<script type="text/javascript" src="js/jquery.min.js"></script>
	
	<script src="select2/select2.js"></script>
    <script>
        $(document).ready(function() {
        	$("#e2_2").select2({
			    placeholder: "请选择项目成员"
			    //allowClear: true
			});
			$("#back").click(function(){
				location.href="main.jspx";
			});
			/*$("#a").click(function(){
				alert($("#e2_2").val());
			});*/
        });
    </script>
</body>
</html>